import { 
  reqPostsensitiveWord ,reqSensitivePage,requpdateSenstiveWord,reqdeleteSensitiveWord,reqCommentList,requpdateComment,reqdeleteComment
} from '@/api'
// state：仓库存储数据的地方
const state = {}
// mutations：修改state的唯一手段，因此第一个参数必须是state，第二个参数为将要修改的数据
const mutations = {
  
}

// action：书写业务逻辑（method方法）
const actions = {
  async postSensitiveWord({ commit }, data) {
    return await reqPostsensitiveWord(data)
  },

  async getSensitiveWordList({commit},data){
    return await reqSensitivePage(data)
  },
  async postupdateSensitive({commit},data){
    return await requpdateSenstiveWord(data)
  },
  async postdeleteSensitiveWord({commit},data){
    return await reqdeleteSensitiveWord(data)
  },
  async getCommentList({commit},data){
    return await reqCommentList(data)
  },
  async updateComment({commit},data){
    return await requpdateComment(data)
  },
  async deleteComment({commit},data){
    return await reqdeleteComment(data)
  },
}
// getters：计算属性
const getters = {}

export default {
  state,
  mutations,
  actions,
  getters,
}
